package com.basker;

import java.io.IOException;

import org.springframework.boot.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;

@Deprecated
public class NestedApplication {
    public static ConfigurableApplicationContext run(Class<?> appClass, String... args) {
        ConfigurableApplicationContext context = SpringApplication.run(appClass, args);

        if ("true".equalsIgnoreCase(System.getProperty("RUN_IN_ECLIPSE"))) {
            System.out.println("You're using Eclipse; click in this console and     "
                    + "press ENTER to call System.exit() and run the shutdown routine.");

            try {
                System.in.read();
            } catch (IOException e) {

            }

            System.exit(0);
        }

        return context;
    }
}
